<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%--导入JSTL 核心库  --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>天天果园-水果网购首选品牌，水果，我们只挑有来头的！</title>
<link rel="stylesheet" type="text/css" href="css/sel.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script src="js/jq.js"></script>
<script src="js/sel.js"></script>
<jsp:include page="head/head.jsp"></jsp:include>
</head>
<body style="position: relative;">
	<div class="fruit_info">
		<div class="fruit_hot">
			<div class="hf_title">
				<span class="ht_l">热卖商品</span><span class="ht_r"><a href="">MORE+</a></span>
			</div>

			<div class="hot_fruit">
				<div class="hf_img">
					<a href="/x-test/FruitServlet?key=info&id=0&fid=1"><img
						src="img/fruits/1/(1).jpg" /></a>
				</div>
				<div c="hf_text">
					<div class="hf_name">
						<a href="/x-test/FruitServlet?key=info&id=0&fid=1">佳沛新西兰绿奇异果</a>
					</div>
					<div class="hf_mon">
						￥<span>78.0</span>
					</div>
				</div>
			</div>
			<div class="hot_fruit">
				<div class="hf_img">
					<a href="/x-test/FruitServlet?key=info&id=0&fid=3"><img
						src="img/fruits/3/(1).jpg" /></a>
				</div>
				<div c="hf_text">
					<div class="hf_name">
						<a href="/x-test/FruitServlet?key=info&id=0&fid=3">枣</a>
					</div>
					<div class="hf_mon">
						￥<span>23.0</span>
					</div>
				</div>
			</div>
			<div class="hot_fruit">
				<div class="hf_img">
					<a href="/x-test/FruitServlet?key=info&id=0&fid=4"><img
						src="img/fruits/4/(1).jpg" /></a>
				</div>
				<div c="hf_text">
					<div class="hf_name">
						<a href="/x-test/FruitServlet?key=info&id=0&fid=4">菠萝</a>
					</div>
					<div class="hf_mon">
						￥<span>59.0</span>
					</div>
				</div>
			</div>
			<div class="hot_fruit">
				<div class="hf_img">
					<a href="/x-test/FruitServlet?key=info&id=0&fid=8"><img
						src="img/fruits/8/(1).jpg" /></a>
				</div>
				<div c="hf_text">
					<div class="hf_name">
						<a href="/x-test/FruitServlet?key=info&id=0&fid=8">南非青提</a>
					</div>
					<div class="hf_mon">
						￥<span>68.0</span>
					</div>
				</div>
			</div>
			<div class="hot_fruit">
				<div class="hf_img">
					<a href="/x-test/FruitServlet?key=info&id=0&fid=9"><img
						src="img/fruits/9/(1).jpg" /></a>
				</div>
				<div c="hf_text">
					<div class="hf_name">
						<a href="/x-test/FruitServlet?key=info&id=0&fid=9">里达葡萄</a>
					</div>
					<div class="hf_mon">
						￥<span>98.0</span>
					</div>
				</div>
			</div>
		</div>


		<script>
			$(function(){
				/*页面加载完毕后执行*/
				/*给 name=abc的 a标签 注册 hover事件*/
				/*a :标签选择器   [name='']属性选择器*/
				/*第1个函数，  鼠标移入  做什么*/
				/*第2个函数，  鼠标移出  做什么*/
				$("a[name='abc']").hover(
						/*鼠标移入*/
						function(){
							/*让当前元素 变绿*/
							$(this).addClass("sgreen");
							/*让它的兄弟们不绿*/
							$(this).siblings().removeClass("sgreen");
						}
				);
			});
		</script>
		<div class="sel">
			<div class="selfruits">
				<ul class="selfruits_ul">
					<li class="selfruits_li">品类：
						<a  href="/fruit/goods/GetAllFruitsServlet"  class="selkey sgreen" name="abc">不限</a>
						<c:forEach items="${categories}" var="category">
							<a name="abc" href="/fruit/goods/GetFruitsByCidServlet?c_id=${category.c_id}" class="selkey">${category.c_name}</a>
						</c:forEach>
					</li>
					<li class="selfruits_li">价格：
						<a name="abc" href=" " class="selkey sgreen">不限</a >
						<a name="abc" href="/fruit/goods/GetAllFruitsServlet?price=a" class="selkey">100以下</a >
						<a name="abc" href="/fruit/goods/GetAllFruitsServlet?price=b" class="selkey">100~300</a >
						<a name="abc" href="/fruit/goods/GetAllFruitsServlet?price=c" class="selkey">300以上</a >
					</li>
				</ul>

			</div>


			<div class="fruitboxs">
				<c:forEach items="${fruits}" var="fruit">
					<div class="fruit_box">
						<div class="fruit_img">
							<a href="/fruit/goods/GetFruitByFidServlet?f_id=${fruit.f_id}">
								<img src="img/fruits/${fruit.f_id}/(1).jpg" />
							</a>
						</div>
						<div class="fruit_name">
							<a href="/fruit/goods/GetFruitByFidServlet?f_id=${fruit.f_id}">${fruit.f_name}</a>
						</div>
						<div class="fruit_spec">${fruit.f_norm}</div>
						<div class="fruit_up">￥${fruit.f_price}</div>
						<div class="flogo">
							<img src="img/flogo.png" />
						</div>
					</div>
				</c:forEach>

			</div>
		</div>
</body>
</html>
